package org.osoftware.mumi.dao.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * The Class PaymentDetail.
 */
@Entity
@Table(name="payment_detail")
public class PaymentDetail extends BaseObject {
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -2735407512715590010L;
	
	/** The payment plan. */
	@ManyToOne
	@JoinColumn(name = "payment_plan_id", updatable = false, insertable = false, nullable=false)
	private PaymentPlan paymentPlan;
	
	/** The amount. */
	@Column(name="amount")
	private Double amount;
	
	/** The date. */
	@Column(name="date")
	private Date date;
	
	/** The payment concept. */
	@ManyToOne
	@JoinColumn(name = "payment_concept_id", updatable = false, insertable = false, nullable=false)
	private PaymentConcept paymentConcept;
	
	/**
	 * Gets the payment plan.
	 *
	 * @return the payment plan
	 */
	public PaymentPlan getPaymentPlan() {
		return paymentPlan;
	}
	
	/**
	 * Sets the payment plan.
	 *
	 * @param paymentPlan the new payment plan
	 */
	public void setPaymentPlan(PaymentPlan paymentPlan) {
		this.paymentPlan = paymentPlan;
	}
	
	/**
	 * Gets the amount.
	 *
	 * @return the amount
	 */
	public Double getAmount() {
		return amount;
	}
	
	/**
	 * Sets the amount.
	 *
	 * @param amount the new amount
	 */
	public void setAmount(Double amount) {
		this.amount = amount;
	}
	
	/**
	 * Gets the date.
	 *
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}
	
	/**
	 * Sets the date.
	 *
	 * @param date the new date
	 */
	public void setDate(Date date) {
		this.date = date;
	}
	
	/**
	 * Gets the payment concept.
	 *
	 * @return the payment concept
	 */
	public PaymentConcept getPaymentConcept() {
		return paymentConcept;
	}
	
	/**
	 * Sets the payment concept.
	 *
	 * @param paymentConcept the new payment concept
	 */
	public void setPaymentConcept(PaymentConcept paymentConcept) {
		this.paymentConcept = paymentConcept;
	}

	@Override
	public String toString() {
		return "PaymentDetail [paymentPlan=" + paymentPlan + ", amount="
				+ amount + ", date=" + date + ", paymentConcept="
				+ paymentConcept + ", toString()=" + super.toString() + "]";
	}
	
}
